<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateActivityDeliveryDetailsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('activity_delivery_details', function (Blueprint $table) {
            $table->uuid('id')->index();
            $table->uuid('delivery_id')->comment("关联delivery_id");//关联delivery_id
            $table->string('act_id')->default("0")->comment("关联活动id");//关联活动id
            $table->string('act_name')->comment("关联活动名称");//关联活动名称s
            $table->string('img_url')->comment("投放图片");//投放图片
            $table->integer('begin_time')->comment("投放开始时间");//投放开始时间
            $table->integer('end_time')->comment("投放结束时间");//投放结束时间
            $table->integer('act_type')->default(2)->comment("活动类型 1-列表活动 2-自有活动");//活动类型
            $table->integer('target')->default(1)->comment("触发用户 1-所有用户 2-性别 3-省份");//触发用户 1-所有用户 2-性别 3-省份
            $table->timestamps();
            $table->primary('id');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('activity_delivery_details', function (Blueprint $table) {
            $table->dropIfExists();
        });
    }
}
